public class EqualatTriangle extends Triangle {
	private static final float COMY = (float)(1/(Math.sqrt(12)));
	private static final float HEIGHT = (float) Math.sqrt(3)/2;

	public EqualatTriangle(float size) {
		this(size, true);
	}

	public EqualatTriangle(float size, boolean pickable) {
		super(size, pickable);
		vertices[0] = new Vector2f(0, HEIGHT);
		vertices[1] = new Vector2f(-.5f, 0);
		vertices[2] = new Vector2f(.5f, 0);
		centerOfMass.x = 0;
		centerOfMass.y = size * COMY;
		
		float moi = size * vertices[0].y * (float)Math.pow(size, 3) / 36;
		moi += size * (float)Math.pow(size * vertices[0].y, 3) / 36;		
		inverseMomentOfInertia = 1 / moi;
		
		renderable.CoMX = centerOfMass.x;
		renderable.CoMY = centerOfMass.y;
	}
}
